# import time;
# time.sleep(3);#等待3s
# print("hello world");
#
# from time import  sleep;
# sleep(3);
# print("hello world");
#
# from time import sleep as s;
# s(3);
# print("hello world");

#2)random
# import  random;
# print(random.random());
# print(random.randint(1,10));
# print(random.uniform(1,10));
'''
规范
#
ctrl+/：多行注释
ctrl+y:删除整行
'''
#2)缩进
# condition =True;
# if condition:
#     print("true");
#     print("ok");
# else:
#     print("false");
#     print("ok");

# 3)空行

# 换行符
# 用\代码换行符


# 3、变量
# python变量不需要进行声明变量，
# name="zy";
# print(type(name));
#
# a=b=c="hello";
# print(a)
# print(b)
# print(c)

# import keyword
# 关键字
# print(keyword.kwlist)

'''
4、变量类型
整数类型
浮点
字符串
布尔类型
空值类型
'''
# 1、
# 数值类型转换
# bin();转二进制
# oct();转八进制
# int();转十进制
# hex();转十六进制
decimal_num = 10
print(decimal_num,"转二进制:",bin(decimal_num))
print(decimal_num,"转8进制:",oct(decimal_num))
print(decimal_num,"转10进制:",int(decimal_num))
print(decimal_num,"转16进制:",hex(decimal_num))

# 浮点类型

# 字符串的切片
str1="123456"
# print(str1[start;end;step])前闭后开[)
print(str1[0:4])#1234;求子串
print(str1[0:4:2])#13

int()




